import { createApp } from 'vue'
import App from './App.vue'
// import './style.css'

// 引入公共样式
import './assets/css/common/common.less';
import './assets/css/common/config.less';


// 引入第三方ui库 - element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/el-loading.css'

import * as Icons from '@element-plus/icons-vue';

// 引入路由
import router from './router/index.js';

// 引入pinia 状态管理工具
import store from './store/index.js';

// 导航栏折叠
import Fragment from 'vue-fragment';

const app = createApp(App);// 创建vue实例

Object.keys(Icons).forEach((key) => {
    app.component(key, Icons[key]);
});

app.use(store);//使用store
app.use(Fragment);//导航栏折叠

app.use(router).use(ElementPlus).mount('#app'); //使用插件并挂载
